package cn.tedu.carehome.foundation.controller;

import cn.tedu.carehome.foundation.pojo.dto.EventAddNewDTO;
import cn.tedu.carehome.foundation.pojo.vo.EventListItemVO;
import cn.tedu.carehome.foundation.pojo.vo.EventStandardVO;
import cn.tedu.carehome.foundation.pojo.vo.FinanceListItemVO;
import cn.tedu.carehome.foundation.service.IEventService;
import cn.tedu.carehome.foundation.service.IFinanceService;
import cn.tedu.carehome.foundation.web.JsonResult;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.hibernate.validator.constraints.Range;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/finance")
@Api(tags = "费用管理模块")

public class FinanceController {


    @Autowired
    private IFinanceService financeService;

    public FinanceController() {
        log.debug("创建控制器类对象：FinanceController");
    }




    @GetMapping("/list")
    @ApiOperation(value="请求财务列表")
    @ApiOperationSupport(order = 200)
    public  JsonResult<List<FinanceListItemVO>> select(){
        log.debug("开始处理后台请求事故列表");
        List<FinanceListItemVO> list=financeService.list();
        return JsonResult.ok(list);
    }

}
